home *** CD-ROM | disk | FTP | other *** search
/ Total Network Tools 2002 / NextStepPublishing-TotalNetworkTools2002-Win95.iso / Archive / Misc Servers / Zope.exe / DTML-RAISE.STX < prev    next >
Encoding:
Text File  |  2000-10-12  |  853 b   |  38 lines

  1. raise: Raises an exception 
  2.  
  3.     The 'raise' tag raises an exception, mirroring the Python 'raise'
  4.     statement. 
  5.  
  6.   Syntax
  7.  
  8.     'raise' tag syntax::
  9.  
  10.       <dtml-raise ExceptionName|ExceptionExpression>
  11.       </dtml-raise>
  12.  
  13.     The 'raise' tag is a block tag. It raises an exception. Exceptions
  14.     can be an exception class or a string. The contents of the tag are
  15.     passed as the error value.
  16.  
  17.   Examples
  18.  
  19.     Raising a KeyError::
  20.  
  21.       <dtml-raise KeyError></dtml-raise>
  22.  
  23.     Raising an HTTP 404 error::
  24.  
  25.       <dtml-raise NotFound>Web Page Not Found</dtml-raise>
  26.  
  27.   See Also
  28.  
  29.     "try tag":dtml-try.stx
  30.  
  31.     "Python Tutorial: Errors and
  32.     Exceptions":http://www.python.org/doc/current/tut/node10.html
  33.  
  34.     "Python Bult-in
  35.     Exceptions":http://www.python.org/doc/current/lib/module-exceptions.html
  36.  
  37.     
  38.